import turtle

# 实例化对象
t = turtle.Turtle()
# 向前100个像素
# t.forward(100)

# 绘制五角星
t.pencolor('red')
t.pensize(3)
for i in range(5):
    t.forward(100)
    t.right(144)

t.hideturtle()

def drawSpiral(t1, linelen):

    if linelen > 0:
        t1.forward(linelen)
        t1.right(90)
        drawSpiral(t1, linelen - 5) # 调用自身

if __name__ == "__main__":
    # 实例化对象
    t1 = turtle.Turtle()
    drawSpiral(t1, 100)
    # 完成绘图
    turtle.done()